﻿@using Fap.Workflow.Model;
@model Fap.AspNetCore.ViewModel.FormViewModel
@{
    WfProcess process = ViewBag.Process;
    string formType = process.FormType; //ViewBag.FormType;
    string ffTemplate = ViewBag.FormTemplate;
    string billPower = ViewBag.FormPower;
    string formName = process.BillTable; //ViewBag.BillTable;
    string appName = process.ProcessName;

}
<script>
    $(function () {
        setTimeout(() => {
            var formPower =@Html.Raw(billPower);
            if (formPower != undefined) {
                $.each(formPower, function (i, item) {

                    if (item.property === 0) {
                        //隐藏
                        $("#" + item.fieldName).text('');
                    }
                });
            }
        }, 0);

    });
        //uParse('#formdiv', {
        //    rootPath: '../../'
        //    //chartContainerHeight: 500
        //});
</script>

<div class="row">
    <div class="col-xs-12" id="formdiv">
        @if (formType == WfFormType.Internal)
        {
            <fap-form id="@formName" form-model="Model"></fap-form>
        }
        else
        {
            <fap-freeform id="@formName" form-model="Model" form-template="@ffTemplate"></fap-freeform>
        }
    </div>
</div>